<template name="visitorEditCustomField">
	<div class="rc-input rc-form-group rc-form-group--small">
		<label class="rc-input__label">
			<div class="rc-input__title">{{label}}</div>
			{{#if $eq type 'select'}}
				<div class="rc-select">
					<select name="{{name}}" class="rc-select__element" data-visitorLivechatData="{{$eq scope 'visitor'}}" data-roomLivechatData="{{$eq scope 'room'}}" disabled="{{disabled}}">
						<option value=""></option>
						{{#each optionsList}}
							<option value="{{.}}" selected="{{selectedField . ..}}">{{.}}</option>
						{{/each}}
					</select>
					{{> icon block="rc-select__arrow" icon="arrow-down" }}
				</div>
			{{else}}
				<div class="rc-input__wrapper">
					<input class="rc-input__element" type="text" name="{{name}}" autocomplete="off" data-visitorLivechatData="{{$eq scope 'visitor'}}" data-roomLivechatData="{{$eq scope 'room'}}" disabled="{{disabled}}" value="{{value}}">
				</div>
			{{/if}}
		</label>
	</div>
</template>
